<?php
/**
 * Created by IntelliJ IDEA.
 * User: Fernando
 * Date: 25/10/2014
 * Time: 21:56
 */

namespace Fiestissima\CRM\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class ClientePersonaType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('cpNombre', 'text')
            ->add('cpApellido', 'text')
            ->add('cTipoDoc', 'choice', array('choices' => array('DNI'=>'DNI', 'CUIT'=>'CUIT', 'CUIL'=>'CUIL')))
            ->add('cNroDoc', 'text')
            ->add('cTipoIva', 'choice', array('choices' => array('Resp Inscripto'=>'Resp Inscripto', 'Excento'=>'Excento', 'Consumidor Final'=>'Consumidor Final')));
    }

    public function getName()
    {
        return 'clientePersona';
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Fiestissima\CRM\Entity\ClientePersona',
        ));
    }
} 